﻿using BLL;
using Function;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using UI.UserControl.Base;

namespace UI.Module.Statistical
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                LoadPage();
            }
        }
        string Message = "";
        private void LoadPage()
        {
            int RecordCount = 0;
            DataTable Page_Dt = new DataTable();
            Page_Dt = BLL.PageQuery2005_BLL.SelectPage(out RecordCount, "ShopID,(select STitle from dbo.ST_Shop where id=ShopID)as STitle", "GX_InvestorShop", " InvestorID=" + Method.CurrentUserID, "[ID] desc", PubConstant.DataBaseTarget.JHShop, out Message);
            ddlistShop.DataSource = Page_Dt;
            ddlistShop.DataTextField = "STitle";
            ddlistShop.DataValueField = "ShopID";
            ddlistShop.DataBind();
           
            //ddlistShop.Items.Insert(0, new ListItem() { Value = "0", Text = "--所有门店--" });
        }
        //获取主标题
        protected string Title(string title)
        {
            string rtitle = "";
            switch (title)
            {
                case "TB": //经营状况同比分析
                    rtitle = "经营状况同比分析";
                    break;
                case "HB"://经营状况同比分析
                    rtitle = "经营状况环比分析";
                    break;
                default:
                    rtitle = "经营状况分析";
                    break;
            }
            return rtitle;
        }
        //获取副标题
        protected string SubTitle(string subtitle)
        {
            string rtitle = "";
            switch (subtitle)
            {
                case "MonthSell": //月销售额
                    rtitle = "月销售额";
                    break;
                case "MonthOrder"://月订单量
                    rtitle = "月订单量";
                    break;
                case "MonthNum"://月客户数
                    rtitle = "月客户数";
                    break;
            }
            return rtitle;
        }
        //y轴标题
        protected string yTitle(string ytitle)
        {
            string rtitle = "";
            switch (ytitle)
            {
                case "MonthSell": //月 销 售 额 (元)
                    rtitle = "月 销 售 额 (元)";
                    break;
                case "MonthOrder"://月 订 单 量 (个)
                    rtitle = "月 订 单 量 (个)";
                    break;
                case "MonthNum"://月 客 户 数 (个)
                    rtitle = "月 客 户 数 (个)";
                    break;
            }
            return rtitle;
        }
        //单位
        protected string unit(string unit)
        {
            string runit = "";
            switch (unit)
            {
                case "yuan": //元
                    runit = "元";
                    break;
                case "ge"://个
                    runit = "个";
                    break;
            }
            return runit;
        }
        
    }
}